/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ULHT.LIG2N1.RC.VO;

import java.io.FileNotFoundException;
import java.io.IOException;

/**
 *
 * @author Administrador
 */
public class GameLimitVO {
        private static int gameTimeMillis = 700000;
     private long gameTime;
     private final String filename = "Limit.Data";

    public GameLimitVO() {
        this.gameTime = 700000; // 700 000 milisegundos
    }

    public GameLimitVO(long gameTime) {
        this.gameTime = gameTime;
    }

    public String getFilename() {
        return filename;
    }
      
    /**
     * @return the gameTime
     */
    public long getGameTime() {
        return gameTime;
    }

    /**
     * @param gameTime the gameTime to set
     */
    public void setGameTime(long gameTime) {
        this.gameTime = gameTime;
    }
    
    public void writeGameLimitToFile() throws FileNotFoundException, IOException{
        FileManage fileManage = new FileManage();
        fileManage.writeLongToFile(this.gameTime,this.filename);
    }
    
    public void readGameLimitFromFile() throws FileNotFoundException, IOException{
        FileManage fileManage = new FileManage();
        fileManage.readLongFromFile(this.filename);
    } 
    
    public static int gameSessionTimeMillis() {
        return gameTimeMillis;
    }
}
